package com.aaa.day1105.third.demo;

import java.util.stream.Stream;

/**
 * @Description:
 * @author:LiWei
 * @date:2022年11月06日10:35
 */
public class Test {
    public static void main(String[] args) {
        String[] arr1 = { "a", "b", "c", "d" };
        String[] arr2 = { "d", "e", "f", "g" };
        Stream<String> stream1 = Stream.of(arr1);
        Stream<String> stream2 = Stream.of(arr2);


        //Stream.concat(stream1,stream2).forEach(System.out::println);


        Stream.concat(stream1,stream2).distinct().forEach(System.out::println);


        //Stream.concat(stream1,stream2).limit(5).forEach(System.out::println);


        //Stream.concat(stream1,stream2).skip(2).forEach(System.out::println);
    }
}
